import CodoBase from "../../lib/CodoBase";

import * as dahuaICC from "../../lib/dahua/icc";
import { dahua } from "../../lib/dahua/icc/type";

export default class DahuaICCCodo extends CodoBase {
	/** 对egg提供lib的对象类 */
	dahuaICC = dahuaICC;

	getAuthService(config: dahua.icc.ICCConfig) {
		return new dahuaICC.AuthService(this.app, config);
	}

	getEventService(config: dahua.icc.ICCConfig) {
		return new dahuaICC.EventService(this.app, config);
	}

	getPartService(config: dahua.icc.ICCConfig) {
		return new dahuaICC.DepartmentService(this.app, config);
	}

	getPersonService(config: dahua.icc.ICCConfig) {
		return new dahuaICC.PersonService(this.app, config);
	}

	getAccessService(config: dahua.icc.ICCConfig) {
		return new dahuaICC.AccessControlService(this.app, config);
	}

	getCardService(config: dahua.icc.ICCConfig) {
		return new dahuaICC.CardService(this.app, config);
	}

	getRoleService(config: dahua.icc.ICCConfig) {
		return new dahuaICC.RoleService(this.app, config);
	}

	getAttendanceService(config: dahua.icc.ICCConfig) {
		return new dahuaICC.AttendanceService(this.app, config);
	}
}
